package servlet;

import java.util.LinkedList;
import java.util.List;

import domain.DirectBet;
import domain.Player;
import domain.Table;

public class Pair {
	private int key; 
	private List<DirectBet> value;
	
	public Pair(int key) {
		this.key = key;
		this.value = new LinkedList<DirectBet>();
	}
	
	public void addBet (int mount, Player p, Table table){
		DirectBet directBet = new DirectBet(this.key, mount);
		p.makeBet(directBet, table);
		value.add(directBet);
	}
	
	public int getKey() {
		return key;
	}
	public List<DirectBet> getValue() {
		return value;
	}
	public void setKey(int key) {
		this.key = key;
	}
	public void setValue(List<DirectBet> value) {
		this.value = value;
	}
	
	@Override
	public String toString() {
		String foo = " ";
		if(! this.value.isEmpty() )
			foo= "#"; 
			
		return this.key+"\n" + foo ;
	}
}
